package com.xdjmall.dao;

import java.sql.SQLException;
import java.util.List;

import com.xdjmall.entity.Goods;
import com.xdjmall.service.dto.StockNumDTO;
import com.xdjmall.util.QueryCondition;

public interface GoodsDao extends BaseDao<Goods>{
	// 返回分页的条数
    Integer getTotalGoods(QueryCondition condition)throws SQLException;
    // 根据主键集合查询
    List<Goods> selectByIds(List<Integer> goodsIds)throws SQLException;
    // 根据查找后分页
    List<Goods> selectGoodsListBySearch(QueryCondition condition)throws SQLException;
    //得到分页查找后条数
    int getTotalGoodsBySearch(QueryCondition condition)throws SQLException;
    // 批量添加
    Integer batchInsert(List<Goods> goodsList)throws SQLException;
    // 修改库存
    Integer updateStockNum(List<StockNumDTO> snds)throws SQLException;
    // 批量更新商品状态
    Integer batchUpdateSellStatus(Integer[] orderIds,Integer sellStatus)throws SQLException;
}
